Documentation for class window_object

Inherits from 	complex_object 

Properties declared in window_object 
	does_hide_when_craftman_is_deactivated 
	does_hide_when_program_is_deactivated 
	frame 
	is_display_enabled 
	is_flush_enabled 
	title 

Class Methods declared in window_object 
	new 

Methods declared in window_object 
	action 
		center 
		close 
		disable_display 
		disable_flush 
		display 
		enable_display 
		enable_flush 
		flush 
		open 
		order_back 
	any 
		center 
		close 
		convert_screen_x(x) 
		convert_screen_y(y) 
		convert_to_screen_x(x) 
		convert_to_screen_y(y) 
		cursor_x 
		cursor_y 
		disable_display 
		disable_flush 
		display 
		does_hide_when_craftman_is_deactivated 
		does_hide_when_program_is_deactivated 
		enable_display 
		enable_flush 
		flush 
		frame 
		height 
		move(x , y) 
		move_top_left(x , y) 
		open 
		order_back 
		position 
		print_postscript 
		set_does_hide_when_craftman_is_deactivated(boolean) 
		set_does_hide_when_program_is_deactivated(boolean) 
		set_title(string) 
		size 
		title 
		width 
		window_did_change_screen 
		window_did_expose 
		window_did_move 
		window_will_close 
		x 
		y 
	events 
		window_did_change_screen 
		window_did_expose 
		window_did_move 
		window_will_close 
	get 
		does_hide_when_craftman_is_deactivated 
		does_hide_when_program_is_deactivated 
		frame 
		title 
	set 
		set_does_hide_when_craftman_is_deactivated(boolean) 
		set_does_hide_when_program_is_deactivated(boolean) 
		set_title(string) 
	size 
		frame 
		height 
		position 
		size 
		width 
		x 
		y 

Class 
#begin_class
window_object 
The class window_object is a subclass of the class complex_object. 
The class window_object is a so-called abstract class. It implements the methods that is shared by all the different window-classes. 
Note: You cannot create instances of an abstract class.
#end_class

Properties 

#begin_property
does_hide_when_craftman_is_deactivated 
Stores a boolean value. It is true if the window hides when CraftMan is not the active application. Otherwise it is false.
#end_property

#begin_property
does_hide_when_program_is_deactivated 
Stores a boolean value. It is true if the window hides when program is not the active program. Otherwise it is false.
#end_property

#begin_property
frame 
Stores the frame of the window in screen coordinates.
#end_property

#begin_property
is_display_enabled 
Stores a boolean value. If it is false it prevents the display methods defined in graphic classes from displaying graphics in the window. This permits you to alter or update graphics before displaying them again.
See disable_display and enable_display.
#end_property

#begin_property
is_flush_enabled 
Stores a boolean value. If it is false and the window is a buffered window, drawing won't automatically be flushed to the screen by the display methods defined in the graphic class. This permits several graphics to be displayed before the results are shown to the user.
#end_property

#begin_property
title 
Stores the title of the window.
#end_property

Methods 

#begin_method
center 
Moves the window to the center of the screen.
Returns self.
#end_method

#begin_method
close 
Closes the window and removes it from the screen.
Returns self.
Also see open.
#end_method

#begin_method
convert_screen_x(x) 
Converts a x coordinate from the screen coordinate system to the window's coordinate system.
#end_method

#begin_method
convert_screen_y(y) 
Converts a y coordinate from the screen coordinate system to the window's coordinate system.
#end_method

#begin_method
convert_to_screen_x(x) 
Converts a x coordinate from the window's coordinate system to the screen coordinate system.
#end_method

#begin_method
convert_to_screen_y(y) 
Converts a y coordinate from the window's coordinate system to the screen coordinate system.
#end_method

#begin_method
cursor_x 
Returns the x coordinate of the cursor location in the the window's coordinate system.
Also see cursor_y
#end_method

#begin_method
cursor_y 
Returns the y coordinate of the cursor location in the the window's coordinate system.
Also see cursor_x
#end_method

#begin_method
disable_display 
This message prevents the display methods defined in graphic classes from displaying graphics in the window. This permits you to alter or update graphics before displaying them again.

Displaying should be disabled only temporarily. Each disable_display message should be paired with a subsequent enable_display message. Pairs of these messages can be nested. Drawing won't be reenabled until the last (unnested) enable_display message is sent.
Returns self.
Also see enable_display.
#end_method

#begin_method
disable_flush 
Disables the flush method for the window. If the window is a buffered window, drawing won't automatically be flushed to the screen by the display methods defined in the graphic class. This permits several graphics to be displayed before the results are shown to the user.

Flushing should be disabled only temporarily, while the window's display is being updated. Each disable_flush message should be paired with a subsequent enable_flush message. Message pairs can be nested. Flushing won't be reenabled until the last (unnested) enable_flush message is sent.
Returns self.
#end_method

#begin_method
display 
Displays all drawing done within the window, including the border, resize bar, and title bar. Each visible graphic within the window's slide hierarchy will be redisplayed. If displaying had been disabled within the window, this method reenables it. 
Returns self.
#end_method

#begin_method
does_hide_when_craftman_is_deactivated 
Returns the does_hide_when_craftman_is_deactivated property of the window.
#end_method

#begin_method
does_hide_when_program_is_deactivated 
Returns the does_hide_when_program_is_deactivated property of the window.
#end_method

#begin_method
enable_display 
Counters the effect of disable_display message, reenabling the display methods defined in the graphic class to display graphics located within the window. Returns self.
Also see disable_display.
#end_method

#begin_method
enable_flush 
Reenables the flush method for the window after it was disabled through a previous disable_flush message. 
Returns self.
Also see disable_flush.
#end_method

#begin_method
flush 
Flushes the receiving window's off-screen buffer to the screen, if the window is a buffered window and flushing hasn't been disabled by disable_flush. This method is automatically invoked when you send a display message to a window or slide. 
Returns self.
Also see disable_flush and enable_flush.
#end_method

#begin_method
frame 
Returns the frame of the window in screen coordinates.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:frame
returns {20 30 300 200}
Note: This method generates garbage. It will be faster to use the x, y, width and height messages instead.
#end_method

#begin_method
height 
Returns the height of the window's frame.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:height
returns 200
#end_method

#begin_method
move(x , y) 
Moves the window so that the lower left corner is located at (x, y) in screen coordinates.
Returns self.
#end_method

#begin_method
move_top_left(x , y) 
Moves the window so that the top left corner is located at (x, y) in screen coordinates.
Returns self.
#end_method

#begin_method
open 
Opens the window and puts it in front of all other windows on the screen.
Returns self.
Also see close and order_back.
#end_method

#begin_method
order_back 
Puts the window behind all other windows on the screen.
Returns self.
#end_method

#begin_method
position 
Returns the position of the lower left corner of the window in screen coordinates.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:position
returns {20 30}
Note: This method generates garbage. It will be faster to use the x and y messages instead.
#end_method

#begin_method
print_postscript 
Prints the PostScript representation of the window on a printer. 
Returns self.
#end_method

#begin_method
set_does_hide_when_craftman_is_deactivated(boolean) 
Sets the property set_does_hide_when_craftman_is_deactivated to boolean. 
Returns self.
#end_method

#begin_method
set_does_hide_when_program_is_deactivated(boolean) 
Sets the property set_does_hide_when_program_is_deactivated to boolean. 
Returns self.
#end_method

#begin_method
set_title(string) 
Sets the property title to string. 
Returns self.
#end_method

#begin_method
size 
Returns the size of the window.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:size
returns {300 200}
Note: This method generates garbage. It will be faster to use the width and height messages instead.
#end_method

#begin_method
title 
Returns the title property of the window.
#end_method

#begin_method
width 
Returns the width of the window's frame.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:width
returns 300
#end_method

#begin_method
window_did_change_screen 
This method does not do anything. The message is sent to the window when the window is moved to a new screen. Specialize the method to get the desired behavior. 
Returns self.
#end_method

#begin_method
window_did_expose 
This method does not do anything. The message is sent to the window when the window is exposed. Specialize the method to get the desired behavior. 
Returns self.
#end_method

#begin_method
window_did_move 
This method does not do anything. The message is sent to the window when the window moved. Specialize the method to get the desired behavior. 
Returns self.
#end_method

#begin_method
window_will_close 
This method does not do anything. The message is sent to the window when the window is about to close. Specialize the method to get the desired behavior. 
Returns self.
#end_method

#begin_method
x 
Returns the x coordinate of the origin of the window's frame in screen coordinates.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:x
returns 20
#end_method

#begin_method
y 
Returns the y coordinate of the origin of the window's frame in screen coordinates.
Ex:
Assume the window my_window is located at (20, 30) and has the width of 300 and the height of 200.
{window my_window}:y
returns 30
#end_method

Class Methods 

#begin_class_method
new 
You cannot create instances of the class window_object since it is an abstract class.
Ex:
{window_object}:new
raises an exception
Exception:
The message new was sent to the class window_object but window_object is an abstract class which you can't make instances of
#end_class_method